package cn.saas.room;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

/**
 * @Title :
 * @date : 2021/10/27 11:55
 */
@Dao
public interface StudentDao {
    @Query("select * from student where name = :name")
    List<StudentDb> queryStudent(String name);

    @Insert
    void insertStudent(StudentDb... student);

    @Update
    void updateStudent(StudentDb... student);

    @Delete
    void deleteStudent(StudentDb... student);

    @Query("select * from student")
    List<StudentDb> queryAllStudent();



}
